"""bs URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from bsfault import userview as bsfault_userviews
from bsfault import faultview as bsfault_faultviews
from bsfault import realtimeview as bsfault_realviews
from bsfault.commen import fault_interface
from bsfault.pageview import page_not_found, page_error, permission_denied
from django.views.generic.base import RedirectView

urlpatterns = {
    url(r'^$', bsfault_userviews.login, name='login'),
    url(r'^login/$', bsfault_userviews.login, name='login'),
    url(r'^check_username/$', bsfault_userviews.check_username, name='check_username'),
    url(r'^adduser/$', bsfault_userviews.adduser, name='adduser'),
    url(r'^deleteuser/$', bsfault_userviews.deleteuser, name='deleteuser'),
    url(r'^update_user/$', bsfault_userviews.update_user, name='update_user'),
    url(r'^update_pass/$', bsfault_userviews.update_pass, name='update_pass'),
    url(r'^rest_pass/$', bsfault_userviews.rest_pass, name='rest_pass'),
    url(r'^index/$', bsfault_userviews.index, name='index'),
    url(r'^userlogin/$', bsfault_userviews.userlogin, name='userlogin'),
    url(r'^login_out/$', bsfault_userviews.login_out, name='login_out'),
    url(r'^welcome/$', bsfault_userviews.welcome, name='welcome'),
    url(r'^userlist/$', bsfault_userviews.userlist, name='userlist'),
    url(r'^userlist_data/$', bsfault_userviews.userlist_data, name='userlist_data'),

    url(r'^fault/$', bsfault_faultviews.fault, name='fault'),
    url(r'^fault_info/$', bsfault_faultviews.faultinfo, name='fault_info'),
    url(r'^operate_info/$', bsfault_faultviews.operate_info, name='operate_info'),
    url(r'^operate_infolist/$', bsfault_faultviews.operate_infolist, name='operate_infolist'),
    url(r'^fault_list/$', bsfault_faultviews.fault_list, name='fault_list'),
    url(r'^fault_infolist/$', bsfault_faultviews.fault_infolist, name='fault_infolist'),
    url(r'^fault_addt/$', bsfault_faultviews.fault_addt, name='fault_addt'),
    url(r'^fault_del/$', bsfault_faultviews.fault_del, name='fault_del'),
    url(r'^fault_addmx/$', bsfault_faultviews.fault_addmx, name='fault_addmx'),
    url(r'^fault_upd/$', bsfault_faultviews.fault_upd, name='fault_upd'),

    url(r'^real_time/$', bsfault_realviews.real_time, name='real_time'),
    url(r'^fault_real/$', bsfault_realviews.fault_real, name='fault_real'),
    url(r'^fault_log/$', fault_interface.fault_log, name='fault_log'),

    url(r'^reason/$', bsfault_faultviews.fault_reason, name='fault_reason'),
    url(r'^get_reason/$', bsfault_faultviews.get_reason, name='get_reason'),
    url(r'^reason_fault/$', bsfault_faultviews.reason_fault, name='reason_fault'),
    url(r'^favicon\.ico$', RedirectView.as_view(url='/static/img/favicon.ico')),
}
handler404 = page_not_found
handler403 = page_error
handler500 = permission_denied
